<layout name="page" />
<block name="content">
	<input type="hidden" id="ajax" name="ajax" value="0">
	<!--  邮件分类 -->
	{:widget('page_header/simple',array('name'=>'邮件分类'))}
	<div class="operate-panel">
		<div class="split"></div>
		<a onclick="add()" class="btn">新建</a>
	</div>
	<div class="ul-table border-bottom ul-table_responsive">
		<ul>
			<li class="thead">
				<span class="pull-right col-12 text-center"> 操作 </span>
				<span class="pull-right col-3text-center"> 状态 </span>
				<span class="auto"> 规则 </span>
			</li>
			<if condition="!empty($list)">
				<li class="no-data">
					没找到数据
				</li>
				<else/>
				<form method='post' id="form_data">
					<foreach name="list" val="vo">
						<li class="tbody">
							<span class="pull-right col-12 text-center"> <a  href="{:url('edit','id='.$vo['id'])}">修改</a>&nbsp; <a  onclick="del({$vo.id});return false;">删除</a></span>
							<span class="pull-right col-3 text-center">{$vo.is_del|status} </span>
							<span class="auto"> 如果：
								{$vo|mail_org_string} </span>
						</li>
					</foreach>
				</form>
			</if>
		</ul>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global'], function() {
			var $ = layui.jquery;

			$("#btn_add").on('click', function() {
				window.open("{:url('add')}", "_self");
			});
		});
		function add() {

		};

		function del(id) {
			ui_confirm('确定要删除吗?', function() {
				window.open(fix_url("{:url('del')}?id=" + id), "_self");
			});
		};

		$(document).ready(function() {
			set_return_url(null);
		});
	</script>
</block>